Skip to content

Updated test to save/retrieve large values - #2763

Merged
wmathurin merged 2 commits into
forcedotcom:devfrom
wmathurin:dev
Sep 12, 2025
Merged

Updated test to save/retrieve large values#2763
wmathurin merged 2 commits into
forcedotcom:devfrom
wmathurin:dev

Conversation

@wmathurin

Copy link
Copy Markdown
Contributor

The test no longer creates large strings (neither before writing nor after reading).

That is however insufficient to avoid the OOM since the underlying implementation read all the bytes in memory for encryption/decryption. So I lowered the size of the test data.

NB: I did attempt to implement a memory-efficient kv-store using CipherOutputStream and CipherInputStream (see wmathurin@047def6)

  • it was noticeably slower
  • it also caused OOMs ! Maybe Android's Conscrypt AES-GCM cipher implementation has internal buffering !! ??

The test no longer creates large strings (neither before writing nor after reading).

That is however insufficient to avoid the OOM since the underlying implementation read all the bytes in memory for encryption/decryption.
So I lowered the size of the test data.

NB: I did attempt to implement a memory-efficient kv-store using CipherOutputStream and CipherInputStream (see 047def6)
- it was noticeably slower
- it also caused OOMs ! Maybe Android's Conscrypt AES-GCM cipher implementation has internal buffering !! ??
@wmathurin

Copy link
Copy Markdown
Contributor Author

NB: The one failure is a flapper in a different lib.

@wmathurin
wmathurin merged commit b89ee3e into forcedotcom:dev Sep 12, 2025
31 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants